<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>修改页面内容</title>
</head>
<body>
    <div id ="screen"> hello </div>
    <button id="one">获取内容</button>
   <button id="two">修改页面内容</button>
</body>
<script>
    let btn=document.querySelector('#one');
    btn.onclick=function(){
        let screenBtn=document.querySelector('#screen');
        console.log(screenBtn.innerHTML);
    }
    let btn2=document.querySelector('#two');
    btn2.onclick=function(){
        let screen=document.querySelector('#screen');
        screen.innerHTML='hello word'
    }
</script>
</html>